package com.acme.bankapp.domain;

import com.acme.bankapp.domain.Account;
import com.acme.bankapp.domain.Gender;
import com.acme.bankapp.domain.CheckingAccount;
import com.acme.bankapp.domain.SavingAccount;

public class Client {
	private Account account;
	private Gender gender;
	private String firstName;
	private String lastName;
	
    public Client (double bal, Gender startGender, String startFirstName, double startOverdraft, String startLastName) {
    	if (startOverdraft != 0)
    		this.account = new CheckingAccount(bal, startOverdraft);
    	else
    		this.account = new SavingAccount(bal);
    	switch (startGender) {
    	case MALE: 
    		this.gender = Gender.MALE;
    		break;
    	case FEMALE:
    		this.gender = Gender.FEMALE;
    		break;
    	default:
    		break;
    	}
    	this.firstName = startFirstName;
    	this.lastName = startLastName;
    }
    public Account getAccount() {
    	return this.account;
    }
    public Gender getGender() {
    	return this.gender;
    }
    public String getFirstName() {
    	return this.firstName;
    }
    public String getLastName() {
    	return this.lastName;
    }
}
